/**
 * Created with Intellij IDEA.
 * Description:
 * User: 33013
 * Date: 2023-07-27
 * Time: 17:01
 */

class Uniseriate{
    private static volatile String str = null;
    private Object locker = new Object();

    public String getStr(){
        if (str == null){
            synchronized (locker) {
                if (str == null) {
                    str = new String();
                }
            }
        }
        return str;
    }

}

class Student implements Comparable<Student>{
    private int a = 0;

    @Override
    public int compareTo(Student o) {
        return this.a - o.a;
    }
}



public class demo1 {
    public static void main(String[] args) {
        Thread thread1 = new Thread(() -> {
            while (true){
                System.out.println("*888");
            }
        });
        thread1.start();
        System.out.println("da");
        Student student = new Student();
    }
}
